<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>入场二维码 - 钓鱼小程序</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* 移动端滚动条优化 - 隐藏滚动条 */
        ::-webkit-scrollbar {
            display: none;
        }
        
        * {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f5f7fa;
            padding-bottom: 60px;
            padding-top: 50px;
            color: #333;
            line-height: 1.6;
            max-width: 375px;
            margin: 0 auto;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: #3498DB;
            color: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 100;
            justify-content: space-between;
        }

        .back-btn {
            background: none;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
        }

        .header h1 {
            font-size: 18px;
            font-weight: 600;
            flex: 1;
            text-align: center;
        }

        .main-content {
            flex: 1;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .qr-container {
            background: white;
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            margin-bottom: 20px;
            width: 100%;
            max-width: 300px;
        }

        .venue-info {
            margin-bottom: 20px;
        }

        .venue-name {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .ticket-type {
            font-size: 14px;
            color: #666;
        }

        .qr-code {
            width: 200px;
            height: 200px;
            background: white;
            border: 2px solid #f0f0f0;
            border-radius: 12px;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            background-image: 
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
            background-size: 20px 20px;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }

        .qr-placeholder {
            font-size: 14px;
            color: #999;
            text-align: center;
            line-height: 1.4;
        }

        .ticket-info {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 20px;
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .info-row:last-child {
            margin-bottom: 0;
        }

        .info-label {
            color: #666;
        }

        .info-value {
            color: #333;
            font-weight: 500;
        }

        .usage-tips {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 20px;
            width: 100%;
        }

        .tips-title {
            font-size: 14px;
            font-weight: 600;
            color: #856404;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .tips-list {
            font-size: 13px;
            color: #856404;
            line-height: 1.5;
        }

        .tips-list li {
            margin-bottom: 4px;
        }

        .action-buttons {
            display: flex;
            gap: 12px;
            width: 100%;
            max-width: 300px;
        }

        .action-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
        }

        .primary-btn {
            background: #3498DB;
            color: white;
        }

        .secondary-btn {
            background: white;
            color: #3498DB;
            border: 1px solid #3498DB;
        }

        .status-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-bottom: 16px;
            padding: 8px 16px;
            background: #d4edda;
            border: 1px solid #c3e6cb;
            border-radius: 20px;
            font-size: 13px;
            color: #155724;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            background: #28a745;
            border-radius: 50%;
        }

        .countdown {
            background: #e3f2fd;
            border: 1px solid #bbdefb;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 20px;
            text-align: center;
            width: 100%;
        }

        .countdown-title {
            font-size: 12px;
            color: #1976d2;
            margin-bottom: 4px;
        }

        .countdown-time {
            font-size: 16px;
            font-weight: 600;
            color: #1976d2;
        }

        .brightness-control {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: rgba(0,0,0,0.6);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            cursor: pointer;
            z-index: 1000;
        }

        .brightness-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: white;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
            z-index: 999;
        }

        .brightness-overlay.active {
            opacity: 0.8;
        }

        /* 小程序胶囊按钮 */
        .capsule-btn {
            background: rgba(255,255,255,0.2);
            border-radius: 16px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .capsule-btn .dot {
            width: 4px;
            height: 4px;
            background: white;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="header">
        <button class="back-btn">←</button>
        <h1>入场二维码</h1>
        <div class="capsule-btn">
            <div class="dot"></div>
            <div class="dot"></div>
            <div class="dot"></div>
        </div>
    </div>

    <div class="main-content">
        <div class="qr-container">
            <div class="venue-info">
                <div class="venue-name">碧波湖钓鱼场</div>
                <div class="ticket-type">全天钓鱼票</div>
            </div>

            <div class="status-indicator">
                <div class="status-dot"></div>
                <span>二维码有效</span>
            </div>

            <div class="qr-code">
                <div class="qr-placeholder">
                    二维码区域<br>
                    请在钓场入口<br>
                    出示此码扫描
                </div>
            </div>

            <div class="ticket-info">
                <div class="info-row">
                    <span class="info-label">订单号</span>
                    <span class="info-value">TK202401150001</span>
                </div>
                <div class="info-row">
                    <span class="info-label">有效期至</span>
                    <span class="info-value">2024-02-15</span>
                </div>
                <div class="info-row">
                    <span class="info-label">钓位类型</span>
                    <span class="info-value">普通钓位</span>
                </div>
            </div>
        </div>

        <div class="countdown">
            <div class="countdown-title">距离过期还有</div>
            <div class="countdown-time">29天 15小时 42分钟</div>
        </div>

        <div class="usage-tips">
            <div class="tips-title">
                💡 使用说明
            </div>
            <ul class="tips-list">
                <li>请在钓场入口处出示此二维码</li>
                <li>工作人员扫码后即可入场</li>
                <li>每张票仅限使用一次</li>
                <li>请确保手机电量充足</li>
                <li>如遇问题请联系现场工作人员</li>
            </ul>
        </div>

        <div class="action-buttons">
            <a href="timer.html" class="action-btn primary-btn">开始计时</a>
            <button class="action-btn secondary-btn">联系客服</button>
        </div>
    </div>

    <div class="brightness-control" onclick="toggleBrightness()">☀️</div>
    <div class="brightness-overlay" id="brightnessOverlay"></div>

    <script>
        let brightnessActive = false;

        function toggleBrightness() {
            const overlay = document.getElementById('brightnessOverlay');
            brightnessActive = !brightnessActive;
            
            if (brightnessActive) {
                overlay.classList.add('active');
                document.querySelector('.brightness-control').textContent = '🌙';
            } else {
                overlay.classList.remove('active');
                document.querySelector('.brightness-control').textContent = '☀️';
            }
        }

        // 倒计时功能
        function updateCountdown() {
            const targetDate = new Date('2024-02-15 23:59:59');
            const now = new Date();
            const diff = targetDate - now;

            if (diff > 0) {
                const days = Math.floor(diff / (1000 * 60 * 60 * 24));
                const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));

                document.querySelector('.countdown-time').textContent = 
                    `${days}天 ${hours}小时 ${minutes}分钟`;
            } else {
                document.querySelector('.countdown-time').textContent = '已过期';
                document.querySelector('.countdown').style.background = '#ffebee';
                document.querySelector('.countdown').style.borderColor = '#ffcdd2';
                document.querySelector('.countdown-time').style.color = '#c62828';
            }
        }

        // 每分钟更新一次倒计时
        updateCountdown();
        setInterval(updateCountdown, 60000);

        // 防止截屏（仅作演示，实际需要原生支持）
        document.addEventListener('keydown', function(e) {
            if (e.key === 'PrintScreen') {
                e.preventDefault();
                alert('为保护您的权益，禁止截屏');
            }
        });
    </script>
</body>
</html> 